import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state:{
        num:'',
        genzongorderId:'',
        TuihuoId:'',
        userXinxi:'',//登录用户信息
        couponsUsed:{
            userId:'',
            userAccount:'',
            userNickname:'',
            used:'',
            notUsed:'',
            expired:'',
        },
    },
    mutations:{
        //设置参数
        setCouponsUsed(state, couponsUsed){
            state.couponsUsed = couponsUsed;
        },
        shopDingdan(state,count){
            state.num = count;
        },
        genzong(state,count){
            state.genzongorderId = count;
        },
        TuihuoXingxi(state,count){
            state.TuihuoId = count;
        },
        getUser(state,count){
            state.userXinxi = count;
        }
    },
    actions:{
    },
    getters:{
    },
})

export default store;
